package com.example.myhuangye.WL;

import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;

import com.example.myhuangye.R;

public class MainWL0ctivity extends AppCompatActivity implements View.OnClickListener{
    private Button WL6,WL7,WL8,WL9;
    private ImageButton WLcall6,WLcall7,WLcall8,WLcall9;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_wl0ctivity);
        WL6= (Button) findViewById(R.id.WL6);
        WL6.setOnClickListener(this);
        WLcall6= (ImageButton) findViewById(R.id.WLcall6);
        WLcall6.setOnClickListener(this);

        WL7= (Button) findViewById(R.id.WL7);
        WL7.setOnClickListener(this);
        WLcall7= (ImageButton) findViewById(R.id.WLcall7);
        WLcall7.setOnClickListener(this);

        WL8= (Button) findViewById(R.id.WL8);
        WL8.setOnClickListener(this);
        WLcall8= (ImageButton) findViewById(R.id.WLcall8);
        WLcall8.setOnClickListener(this);

        WL9= (Button) findViewById(R.id.WL9);
        WL9.setOnClickListener(this);
        WLcall9= (ImageButton) findViewById(R.id.WLcall9);
        WLcall9.setOnClickListener(this);
        findViewById(R.id.HT20).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });

    }//回退//

    public void onClick(View view) {//点击事件//
        switch (view.getId()){
            case R.id.WL6:
                Uri uri = Uri.parse("http://www.fedex.com");
                Intent intent = new Intent(Intent.ACTION_VIEW, uri);
                startActivity(intent);

                break;
            case R.id.WLcall6:
                Intent intent1=  new Intent(Intent.ACTION_DIAL);
                intent1.setData(Uri.parse("tel:400-188-8888"));
                startActivity(intent1);
                break;

            case R.id.WL7:
                Uri uri1 = Uri.parse("http://www.cgbchina.com.cn");
                Intent intent2 = new Intent(Intent.ACTION_VIEW, uri1);
                startActivity(intent2);

                break;
            case R.id.WLcall7:
                Intent intent3=  new Intent(Intent.ACTION_DIAL);
                intent3.setData(Uri.parse("tel:95508"));
                startActivity(intent3);
                break;

            case R.id.WL8:
                Uri uri2 = Uri.parse("http://www.sldex.com");
                Intent intent4 = new Intent(Intent.ACTION_VIEW, uri2);
                startActivity(intent4);

                break;
            case R.id.WLcall8:
                Intent intent5=  new Intent(Intent.ACTION_DIAL);
                intent5.setData(Uri.parse("tel:412-8568"));
                startActivity(intent5);
                break;

            case R.id.WL9:
                Uri uri3 = Uri.parse("http://www.ddwl.com.cn");
                Intent intent6 = new Intent(Intent.ACTION_VIEW, uri3);
                startActivity(intent6);

                break;
            case R.id.WLcall9:
                Intent intent7=  new Intent(Intent.ACTION_DIAL);
                intent7.setData(Uri.parse("tel:027-83550339"));
                startActivity(intent7);
                break;


        }


    }



}




